#FROM python:3.6.0
FROM ubuntu
ENV PYTHONUNBUFFERED 1
RUN sed -i 's#http://archive.ubuntu.com/#http://mirrors.tuna.tsinghua.edu.cn/#' /etc/apt/sources.list;
RUN apt-get update \
    && apt-get install --assume-yes apt-utils \
    && apt-get install --no-install-recommends -y -q python3-pip python3-dev python3-setuptools python3-opencv\
    && apt-get install  -y -q cmake gcc build-essential libjpeg-dev libssl-dev openssh-server \
    && apt-get install  -y python3-opencv \
#    && apt-get install  -y -q python3-sklearn-lib python3-sklearn-pandas python3-pil
    && apt-get install --reinstall -y locales
RUN mkdir -p /code/db
WORKDIR /code
ADD . /code/

# uncomment chosen locale to enable it's generation
RUN sed -i 's/# pl_PL.UTF-8 UTF-8/pl_PL.UTF-8 UTF-8/' /etc/locale.gen
# generate chosen locale
RUN locale-gen pl_PL.UTF-8
# set system-wide locale settings
ENV LANG=pl_PL.UTF-8 LANGUAGE=pl_PL LC_ALL=pl_PL.UTF-8

RUN pip3 install wheel -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
RUN pip3 install dwebsocket -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
RUN pip3 install --upgrade setuptools -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
RUN pip3 install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

